package com.xd.pre.modules.tpshop.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.xd.pre.modules.tpshop.domain.TpOrderGoods;
import com.xd.pre.modules.tpshop.domain.TpSpecGoodsPrice;
import com.xd.pre.modules.tpshop.mapper.TpOrderGoodsMapper;
import com.xd.pre.modules.tpshop.service.ITpOrderGoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lx
 * @since 2020-06-03
 */
@Service
public class TpOrderGoodsServiceImpl extends ServiceImpl<TpOrderGoodsMapper, TpOrderGoods> implements ITpOrderGoodsService {

    @Autowired
    TpOrderGoodsMapper orderGoodsMapper;

    @Override
    public List<TpOrderGoods> findByOrderId(Integer orderId) {
        LambdaQueryWrapper<TpOrderGoods> lambdaQuery = Wrappers.lambdaQuery();
        lambdaQuery.eq(TpOrderGoods::getOrderId, orderId);
        return list(lambdaQuery);
    }
}
